import extensions from './extensions';
import loading from './loading';
import servers from './servers';
import studies from './studies';
import measurements from './measurements';
import viewports from './viewports';
import version from './version';

import sidePanels, { defaultState as defaultSidePanels } from './preferences/sidePanels';
import wlPresets, { defaultState as defaultWLPresets } from './preferences/wlPresets';
import hotkeys, { defaultState as defaultHotkeys } from './preferences/hotkeys';
import commons, { defaultState as defaultCommons } from './preferences/commons';

import { combineReducers } from 'redux';

const reducers = {
  extensions,
  loading,
  servers,
  studies,
  measurements,
  viewports,
  version,
  preferences: combineReducers({ sidePanels, wlPresets, hotkeys, commons }),
};

const defaultPreferences = {
  defaultSidePanels,
  defaultWLPresets,
  defaultHotkeys,
  defaultCommons,
};

export { defaultPreferences };

export default reducers;
